<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: QcnSim/TrafficGenerator.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d21be12960473ba5c51e5f9beea3525e.html">QcnSim</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">TrafficGenerator.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_traffic_generator_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_traffic_generator_8h.html">TrafficGenerator.h</a>&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">   37</a></span>&#160;<a class="code" href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator::TrafficGenerator</a>(<a class="code" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;simulatorGlobals, <a class="code" href="class_scheduler.html">Scheduler</a> &amp;scheduler, <a class="code" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> eventType, std::shared_ptr&lt;Entity&gt; tokenContents,</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        std::shared_ptr&lt;Entity&gt; source, std::shared_ptr&lt;Entity&gt; destination, <span class="keywordtype">int</span> priority): scheduler(scheduler), simulatorGlobals(simulatorGlobals), eventType(eventType),</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        tokenContents(tokenContents), source(source), destination(destination), priority(priority), isOn(false), tokensGeneratedCount(0) {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;}</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#aa805566ed505ad0f90982610bcf3869a">   57</a></span>&#160;<a class="code" href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator::TrafficGenerator</a>(<a class="code" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;simulatorGlobals, <a class="code" href="class_scheduler.html">Scheduler</a> &amp;scheduler, <a class="code" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> eventType, std::shared_ptr&lt;Entity&gt; tokenContents,</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        std::shared_ptr&lt;Entity&gt; source, std::shared_ptr&lt;Entity&gt; destination, <span class="keywordtype">int</span> priority, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> seed): scheduler(scheduler), simulatorGlobals(simulatorGlobals), eventType(eventType),</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        tokenContents(tokenContents), source(source), destination(destination), priority(priority), isOn(false), tokensGeneratedCount(0) {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    simulatorGlobals.<a class="code" href="class_simulator_globals.html#a4f30b6252c3682679c05233afbc0604d">seedRandomNumberGenerator</a>(seed);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;}</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">   75</a></span>&#160;std::shared_ptr&lt;Token&gt; <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(<span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, this-&gt;<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>));</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a49bef7ab761909d3b21f057a0f24b135">  103</a></span>&#160;std::shared_ptr&lt;Token&gt; <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(std::shared_ptr&lt;Entity&gt; tokenContents, <span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals. Use tokenContents from parameters.</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, tokenContents, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>));</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;}</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#af51fd5d3e1200ae9e7d849a554647fcd">  131</a></span>&#160;std::shared_ptr&lt;Token&gt; <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; explicitRoute, <span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, this-&gt;<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, explicitRoute));</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        }</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    }</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;}</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#ac0ccf573b26189a81bcbb4d66b28a922">  160</a></span>&#160;std::shared_ptr&lt;Token&gt; <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(std::shared_ptr&lt;Entity&gt; tokenContents, std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; explicitRoute, <span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals. Use tokenContents from parameters.</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, tokenContents, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, explicitRoute));</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    }</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;}</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#aad024e020fac17dbee74f0da16707df1">  178</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_traffic_generator.html#aad024e020fac17dbee74f0da16707df1">TrafficGenerator::turnOn</a>() {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a> = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;}</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#af1aeb5d90d269a1d1ac5316522b5233e">  186</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_traffic_generator.html#af1aeb5d90d269a1d1ac5316522b5233e">TrafficGenerator::turnOff</a>() {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;}</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#ac8c16ee901079f8279fafd7411098cbd">  195</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_traffic_generator.html#ac8c16ee901079f8279fafd7411098cbd">TrafficGenerator::setTokenContents</a>(std::shared_ptr&lt;Entity&gt; tokenContents) {</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    this-&gt;tokenContents = <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;}</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a3f71664ca8b268773234c1538539bebf">  204</a></span>&#160;std::shared_ptr&lt;Entity&gt; <a class="code" href="class_traffic_generator.html#a3f71664ca8b268773234c1538539bebf">TrafficGenerator::getTokenContents</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#ac97d2e786e7c91117fbf590988eefd04">  213</a></span>&#160;<a class="code" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="code" href="class_traffic_generator.html#ac97d2e786e7c91117fbf590988eefd04">TrafficGenerator::getEventType</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;}</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#aa9c53b70da6a733cb0723282b291b25f">  222</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_traffic_generator.html#aa9c53b70da6a733cb0723282b291b25f">TrafficGenerator::setEventType</a>(<a class="code" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> eventType) {</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    this-&gt;eventType = <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;}</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div>
<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a2247f62c33cf0875f423b58403af7042">  231</a></span>&#160;std::shared_ptr&lt;Entity&gt; <a class="code" href="class_traffic_generator.html#a2247f62c33cf0875f423b58403af7042">TrafficGenerator::getSource</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;}</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div>
<div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#ad5c0ccdbf176c8aadd4b1bc7771ea326">  240</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_traffic_generator.html#ad5c0ccdbf176c8aadd4b1bc7771ea326">TrafficGenerator::setSource</a>(std::shared_ptr&lt;Entity&gt; source) {</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    this-&gt;source = <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;}</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div>
<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#abb89d1eefa73ddf5ea95167bd9245b48">  249</a></span>&#160;std::shared_ptr&lt;Entity&gt; <a class="code" href="class_traffic_generator.html#abb89d1eefa73ddf5ea95167bd9245b48">TrafficGenerator::getDestination</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;}</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div>
<div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#ab9b21f5739748fadede79c7e4fa35ed7">  258</a></span>&#160;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_traffic_generator.html#ab9b21f5739748fadede79c7e4fa35ed7">TrafficGenerator::getTokensGeneratedCount</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;}</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a9984034478b838d1f09d275e297f3309">  267</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_traffic_generator.html#a9984034478b838d1f09d275e297f3309">TrafficGenerator::setDestination</a>(std::shared_ptr&lt;Entity&gt; destination) {</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    this-&gt;destination = <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;}</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">  279</a></span>&#160;std::shared_ptr&lt;ProtocolDataUnit&gt; <a class="code" href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">TrafficGenerator::createInstanceTrafficEventPdu</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pduSize, <span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(recordRoute), pduSize));</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    }</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;}</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#ae439634e20e6b7844a0269d6baea7e6c">  297</a></span>&#160;std::shared_ptr&lt;ProtocolDataUnit&gt; <a class="code" href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">TrafficGenerator::createInstanceTrafficEventPdu</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pduSize, std::shared_ptr&lt;Entity&gt; pduContents, <span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(pduContents, recordRoute), pduSize));</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    }</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;}</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a39ab5cd8466b7d2685442000b48070a9">  315</a></span>&#160;std::shared_ptr&lt;ProtocolDataUnit&gt; <a class="code" href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">TrafficGenerator::createInstanceTrafficEventPdu</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pduSize, std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; explicitRoute,</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;                                                                                  <span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(explicitRoute, recordRoute), pduSize));</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    }</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;}</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div>
<div class="line"><a name="l00335"></a><span class="lineno"><a class="line" href="class_traffic_generator.html#a058d0a28ed8206bc5b8295498673fefe">  335</a></span>&#160;std::shared_ptr&lt;ProtocolDataUnit&gt; <a class="code" href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">TrafficGenerator::createInstanceTrafficEventPdu</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pduSize, std::shared_ptr&lt;Entity&gt; tokenContents,</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;                                                                                           std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; explicitRoute,</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;                                                                                           <span class="keywordtype">bool</span> recordRoute) {</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(tokenContents, explicitRoute, recordRoute), pduSize));</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    }</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a4efc8d0f973cf1ea906c50e85b6e4ec7"><div class="ttname"><a href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">TrafficGenerator::createInstanceTrafficEventPdu</a></div><div class="ttdeci">virtual std::shared_ptr&lt; ProtocolDataUnit &gt; createInstanceTrafficEventPdu(unsigned int pduSize, bool recordRoute=false)=0</div><div class="ttdoc">Creates an instance of traffic event with PDU. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00279">TrafficGenerator.cpp:279</a></div></div>
<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="_event_type_8h_html_a2628ea8d12e8b2563c32f05dc7fff6fa"><div class="ttname"><a href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a></div><div class="ttdeci">EventType</div><div class="ttdoc">EventType enum class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_type_8h_source.html#l00029">EventType.h:29</a></div></div>
<div class="ttc" id="class_scheduler_html"><div class="ttname"><a href="class_scheduler.html">Scheduler</a></div><div class="ttdoc">Scheduler class. </div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8h_source.html#l00058">Scheduler.h:58</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa9c53b70da6a733cb0723282b291b25f"><div class="ttname"><a href="class_traffic_generator.html#aa9c53b70da6a733cb0723282b291b25f">TrafficGenerator::setEventType</a></div><div class="ttdeci">virtual void setEventType(EventType eventType)</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00222">TrafficGenerator.cpp:222</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6fcdb1ce1b3fb4f35c021ea8b99f6cf5"><div class="ttname"><a href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator::TrafficGenerator</a></div><div class="ttdeci">TrafficGenerator(SimulatorGlobals &amp;simulatorGlobals, Scheduler &amp;scheduler, EventType eventType, std::shared_ptr&lt; Entity &gt; tokenContents, std::shared_ptr&lt; Entity &gt; source, std::shared_ptr&lt; Entity &gt; destination, int priority)</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00037">TrafficGenerator.cpp:37</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2247f62c33cf0875f423b58403af7042"><div class="ttname"><a href="class_traffic_generator.html#a2247f62c33cf0875f423b58403af7042">TrafficGenerator::getSource</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Entity &gt; getSource() const </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00231">TrafficGenerator.cpp:231</a></div></div>
<div class="ttc" id="class_traffic_generator_html_ac97d2e786e7c91117fbf590988eefd04"><div class="ttname"><a href="class_traffic_generator.html#ac97d2e786e7c91117fbf590988eefd04">TrafficGenerator::getEventType</a></div><div class="ttdeci">virtual EventType getEventType() const </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00213">TrafficGenerator.cpp:213</a></div></div>
<div class="ttc" id="class_token_html"><div class="ttname"><a href="class_token.html">Token</a></div><div class="ttdoc">Token class. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00044">Token.h:44</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a3f71664ca8b268773234c1538539bebf"><div class="ttname"><a href="class_traffic_generator.html#a3f71664ca8b268773234c1538539bebf">TrafficGenerator::getTokenContents</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Entity &gt; getTokenContents() const </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00204">TrafficGenerator.cpp:204</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_ad5c0ccdbf176c8aadd4b1bc7771ea326"><div class="ttname"><a href="class_traffic_generator.html#ad5c0ccdbf176c8aadd4b1bc7771ea326">TrafficGenerator::setSource</a></div><div class="ttdeci">virtual void setSource(std::shared_ptr&lt; Entity &gt; source)</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00240">TrafficGenerator.cpp:240</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_ac8c16ee901079f8279fafd7411098cbd"><div class="ttname"><a href="class_traffic_generator.html#ac8c16ee901079f8279fafd7411098cbd">TrafficGenerator::setTokenContents</a></div><div class="ttdeci">virtual void setTokenContents(std::shared_ptr&lt; Entity &gt; tokenContents)</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00195">TrafficGenerator.cpp:195</a></div></div>
<div class="ttc" id="class_traffic_generator_html_af1aeb5d90d269a1d1ac5316522b5233e"><div class="ttname"><a href="class_traffic_generator.html#af1aeb5d90d269a1d1ac5316522b5233e">TrafficGenerator::turnOff</a></div><div class="ttdeci">virtual void turnOff()</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00186">TrafficGenerator.cpp:186</a></div></div>
<div class="ttc" id="class_traffic_generator_html_ab9b21f5739748fadede79c7e4fa35ed7"><div class="ttname"><a href="class_traffic_generator.html#ab9b21f5739748fadede79c7e4fa35ed7">TrafficGenerator::getTokensGeneratedCount</a></div><div class="ttdeci">virtual unsigned int getTokensGeneratedCount() const </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00258">TrafficGenerator.cpp:258</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_simulator_globals_html"><div class="ttname"><a href="class_simulator_globals.html">SimulatorGlobals</a></div><div class="ttdoc">Simulator-scope variables and parameters. </div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8h_source.html#l00158">SimulatorGlobals.h:158</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aad024e020fac17dbee74f0da16707df1"><div class="ttname"><a href="class_traffic_generator.html#aad024e020fac17dbee74f0da16707df1">TrafficGenerator::turnOn</a></div><div class="ttdeci">virtual void turnOn()</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00178">TrafficGenerator.cpp:178</a></div></div>
<div class="ttc" id="_traffic_generator_8h_html"><div class="ttname"><a href="_traffic_generator_8h.html">TrafficGenerator.h</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9984034478b838d1f09d275e297f3309"><div class="ttname"><a href="class_traffic_generator.html#a9984034478b838d1f09d275e297f3309">TrafficGenerator::setDestination</a></div><div class="ttdeci">virtual void setDestination(std::shared_ptr&lt; Entity &gt; destination)</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00267">TrafficGenerator.cpp:267</a></div></div>
<div class="ttc" id="class_simulator_globals_html_a4f30b6252c3682679c05233afbc0604d"><div class="ttname"><a href="class_simulator_globals.html#a4f30b6252c3682679c05233afbc0604d">SimulatorGlobals::seedRandomNumberGenerator</a></div><div class="ttdeci">void seedRandomNumberGenerator(unsigned int seed)</div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8cpp_source.html#l00147">SimulatorGlobals.cpp:147</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
<div class="ttc" id="class_traffic_generator_html_abb89d1eefa73ddf5ea95167bd9245b48"><div class="ttname"><a href="class_traffic_generator.html#abb89d1eefa73ddf5ea95167bd9245b48">TrafficGenerator::getDestination</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Entity &gt; getDestination() const </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00249">TrafficGenerator.cpp:249</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 6 2014 12:30:37 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
